package com.wallet.service.Impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wallet.dao.RoleMenuDao;
import com.wallet.entity.RoleMenu;
import com.wallet.entity.example.RoleMenuExample;
import com.wallet.entity.result.JsonResult;
import com.wallet.service.BaseService;

@Service
public class RoleMenuServiceImpl implements BaseService<RoleMenu, RoleMenuExample> {
	
	@Autowired
	RoleMenuDao roleMenuDao;

	@Override
	public int save(RoleMenu t) {
		return roleMenuDao.insert(t);
	}

	@Override
	public int insertBatch(List<RoleMenu> list) {
		return 0;
	}

	@Override
	public int del(Integer id) {
		return roleMenuDao.deleteByPrimaryKey(id);
	}

	@Override
	public int upd(RoleMenu t) {
		return roleMenuDao.updateByPrimaryKey(t);
	}

	@Override
	public RoleMenu getDetail(Integer id) {
		return roleMenuDao.selectByPrimaryKey(id);
	}

	@Override
	public JsonResult showPage(Integer page, Integer size) {
		return null;
	}

	@Override
	public Integer getCount() {
		return roleMenuDao.selectCount();
	}

	@Override
	public List<RoleMenu> selectAll() {
		return roleMenuDao.selectAll();
	}

	@Override
	public List<RoleMenu> selectByExample(RoleMenuExample example) {
		return roleMenuDao.selectByExample(example);
	}

}
